package com.wwtech.epp.ui.activity.work.module;

import com.wwtech.epp.data.api.HttpAPIWrapper;
import com.wwtech.epp.ui.activity.base.ActivityScope;
import com.wwtech.epp.ui.activity.work.DynamicAppActivity;
import com.wwtech.epp.ui.activity.work.contract.DynamicAppContract;
import com.wwtech.epp.ui.activity.work.presenter.DynamicAppPresenter;

import dagger.Module;
import dagger.Provides;

/**
 * @author hzp
 * @Package com.wwtech.epp.ui.activity.work
 * @Description: The moduele of DynamicAppActivity, provide field for DynamicAppActivity
 * @date 2017/09/18 21:54:46
 */
@Module
public class DynamicAppModule {
    private final DynamicAppContract.View mView;


    public DynamicAppModule(DynamicAppContract.View view) {
        this.mView = view;
    }

    @Provides
    @ActivityScope
    public DynamicAppPresenter provideDynamicAppPresenter(HttpAPIWrapper httpAPIWrapper, DynamicAppActivity mActivity) {
        return new DynamicAppPresenter(httpAPIWrapper, mView, mActivity);
    }

    @Provides
    @ActivityScope
    public DynamicAppActivity provideDynamicAppActivity() {
        return (DynamicAppActivity) mView;
    }
}